//
//  SaleModel.m
//  LvXingPai
//
//  Created by mafang on 16/8/10.
//  Copyright © 2016年 _Junxee. All rights reserved.
//

#import "SaleModel.h"

@implementation SaleModel

// 初始化赋值
- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        self.title = dict[@"title"];
        self.commodityId = [NSString stringWithFormat:@"%@",dict[@"commodityId"]];
        self.marketPrice = [NSString stringWithFormat:@"%@",dict[@"marketPrice"]];
        self.price = [NSString stringWithFormat:@"%@",dict[@"price"]];
        
        NSDictionary *d = dict[@"seller"];
        self.name = d[@"name"];
        
        NSDictionary *d1 = dict[@"locality"];
        self.zhName = d1[@"zhName"];
        
        NSDictionary *d2 = dict[@"cover"];
        self.coverurl = d2[@"url"];
    }
    return self;
}

+ (instancetype)modelWithDict:(NSDictionary *)dict
{
    return [[self alloc] initWithDict:dict];
}

@end
